package com.galaxy.device.domain.bo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.galaxy.common.core.validate.AddGroup;
import com.galaxy.common.core.validate.EditGroup;
import com.galaxy.common.mybatis.core.domain.BaseEntity;
import com.galaxy.device.domain.DeviceBase;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

import java.math.BigInteger;

/**
 * 设备基础信息业务对象
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = DeviceBase.class)
public class DeviceBaseBo extends BaseEntity {

    /**
     * 设备ID
     */
    @NotNull(message = "设备ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 设备编号
     */
    @NotBlank(message = "设备编号不能为空", groups = { AddGroup.class, EditGroup.class })
    @Size(min = 0, max = 32, message = "设备编号长度不能超过32个字符")
    private String deviceNo;

    /**
     * 设备名称
     */
    @NotBlank(message = "设备名称不能为空", groups = { AddGroup.class, EditGroup.class })
    @Size(min = 0, max = 100, message = "设备名称长度不能超过100个字符")
    private String deviceName;

    /**
     * 设备序列号
     */
    @NotBlank(message = "设备序列号不能为空", groups = { AddGroup.class, EditGroup.class })
    @Size(min = 0, max = 64, message = "设备序列号长度不能超过64个字符")
    private String sn;

    /**
     * 设备型号
     */
    @NotBlank(message = "设备型号不能为空", groups = { AddGroup.class, EditGroup.class })
    @Size(min = 0, max = 50, message = "设备型号长度不能超过50个字符")
    private String model;

    /**
     * 机器类型ID
     */
    @NotNull(message = "机器类型ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long machineTypeId;

    /**
     * 管理员ID
     */
    private Long managerId;

    /**
     * 通道总数
     */
    private Integer channelCount;

    /**
     * 状态(0:离线,1:在线,2:故障,3:维护中)
     */
    private Integer status;

    @NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
    private String imgUrl;

}
